using System;

namespace IQIGame.Onigao.Framework
{
    public abstract class ObjectPoolBase
    {
        public abstract int Id { get; }

        public abstract ObjPoolTypeGroupKey FullName { get; }
        public abstract Type ObjectType { get; }
        /// <summary>
        /// 池内现有资源总数
        /// </summary>
        public abstract int TotalCount { get; }
        public abstract float AutoReleaseInterval { get; set; }
        /// <summary>
        /// 单个类型资源（预设相同）容量
        /// 如：场景中同一种怪物最大存储数量
        /// </summary>
        public abstract int SameResCapacity { get; set; }
        /// <summary>
        /// 所有资源的总容量
        /// 如：场景中所有怪物最大存储数
        /// </summary>
        public abstract int TotalCapacity { get; set; }
        public abstract float ExpireTime { get; set; }
        /// <summary>
        /// 池内现有单个类型资源（预设相同）数量
        /// </summary>
        /// <param name="assetName"></param>
        /// <returns></returns>
        public abstract int GetSpecificResCount(string assetName);
        public abstract IPoolObject GetObject(string assetName);
        public abstract void PutBackObject(IPoolObject obj);
        public abstract void Release();
        public abstract void ForceReleaseAll();
        public abstract void OnUpdate(float elapseSeconds, float realElapseSeconds);
        public abstract void Dispose();
    }
}
